<?php

/**
 *
 * Generates block with list of
 * links to questions.
 *
 * This block is shown or user details page
 * when viewing user profile
 *
 */
class tplUquestions extends \StudyBuddy\Template\Template
{

	protected static function func(&$a){
		if(!empty($a['a_closed'])){
			$a['title'] = $a['title'].' [closed]';
		}
	}

	protected static $vars = array(
	'_id' => '0', //1
	'i_votes' => '0', //2
	'i_ans' => '0', //3
	'i_views' => '0', //4
	'url' => '', //5
	'intro' => '', //6
	'title' => '', //7
	'tags_c' => '', //8
	'tags_html' => '', //9
	'status' => 'un', //10
	'username' => '', //11
	'avtr' => '',//12
	'hts' => '',//13
	'i_ts' => '',//14
	'vw_s' => 's',//15
	'v_s' => '',//16
	'ans_s' => ''//17
	);

	protected static $tpl = '
	<div class="qrow" id="q-%1$s">  
	    <div class="qstats2">        
	       <div class="sqr1 vc2" style="display:none;">
	          %2$s
	          <br>
	          vote%16$s
	       </div>
	       <div class="sqr1 %10$s">
	       <span class="middle">
	       		%3$s
	       		<br>answer%17$s
	       		</span>
	       </div>
	       <div class="sqr1 vws2">
	         	%4$s
	         	<br>
	         	view%15$s
	       </div>
	    </div>
    <!-- //statsdiv -->
    <div class="smmry2">
        <a href="/q%1$s/%5$s" class="ql" title="%6$s">%7$s</a><br>
        <div class="tgs2 %8$s">%9$s</div>
        <div class="asked2"><span rel="in">asked </span><span title="%13$s" class="ts" rel="time">%13$s</span></div>
            
    </div>
    <!-- //smmry -->
	</div>
	<!-- //qs -->';
}
